<ion-side-menus ng-class="{'saverMode': settings.saverMode}">
  <ion-side-menu-content>
    <ion-nav-bar class="bar-dark">
      <ion-nav-back-button>
      </ion-nav-back-button>
      <ion-nav-buttons side="left">
        <button class="button button-icon ion-navicon" menu-toggle="left">
          <i class="notifyBadge" ng-if="messagesCount"></i>
        </button>
      </ion-nav-buttons>
    </ion-nav-bar>
    <ion-nav-view name="menuContent"></ion-nav-view>
  </ion-side-menu-content>

  <ion-side-menu side="left" expose-aside-when="(min-width:736px)">
    <ion-header-bar class="bar-dark">
      <img id="logo" src="img/cnodejs_light.svg">
      <h1 ng-if="ENV.name != 'production'" class="title" id="devTag">dev</h1>
    </ion-header-bar>
    <ion-content class="has-header">
      <ion-list>
        <ion-item on-hold="onHoldLogin()" ng-click="login()" ng-if="loginName == null">
          登录
          <i class="icon ion-looping" ng-if="processing"></i>
        </ion-item>
        <ion-item menu-close class="item-icon-left" ng-if="loginName" href="#/user/{{loginName}}">
          <i class="icon ion-person"></i>
          {{loginName}}
        </ion-item>
        <ion-item menu-close class="item-icon-left" href="#/my/messages" ng-if="loginName">
          <i class="icon ion-email"></i>
          我的消息
          <span ng-if="messagesCount" class="badge badge-assertive messagesCount">
            {{messagesCount > 9 ? 'N' : messagesCount}}
          </span>
        </ion-item>
        <ion-item class="item-divider">
          板块
        </ion-item>
        <ion-item menu-close ng-if="tab.value != undefined" ng-repeat="tab in tabs" href="#/topics/{{tab.value}}">
          {{tab.label}}
        </ion-item>
        <ion-item class="item-divider">
          其他
        </ion-item>
        <ion-item menu-close href="#/settings">
          设置
        </ion-item>
      </ion-list>
    </ion-content>
    <ion-footer-bar align-title="left" class="bar-light item-icon-left">
      <i class="icon ion-social-github"></i>
      <h1 class="title">github.com/lanceli</h1>
    </ion-footer-bar>
  </ion-side-menu>
</ion-side-menus>
